home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Publishing_19 / Alpha 6.5.sit / Help / Debugging < prev    next >
MacBinary  |  1994-08-03  |  2.5 KB  |  [TEXT/ALFA]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: Debugging

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Aug 3 00:32:24 1994, modified Wed Aug 3 00:32:24 1994, creator Alpha editor, type ASCII, 1944 bytes "Debugging" , at 0x818 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ALFA]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 44 65 62 75 67 67 | 69 6e 67 00 00 00 00 00 |..Debugg|ing.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 41 4c 46 | 41 01 00 00 00 00 00 00 |.TEXTALF|A.......|
|00000050| 00 00 00 00 00 07 98 00 | 00 01 7e aa 64 ce 58 aa |........|..~.d.X.|
|00000060| 64 ce 58 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |d.X.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 bd fa 00 00 |........|........|
|00000080| 35 2e 30 20 69 6e 74 72 | 6f 64 75 63 65 73 20 74 |5.0 intr|oduces t|
|00000090| 68 65 20 54 63 6c 20 66 | 75 6e 63 74 69 6f 6e 2d |he Tcl f|unction-|
|000000a0| 74 72 61 63 69 6e 67 20 | 63 6f 6d 6d 61 6e 64 20 |tracing |command |
|000000b0| 27 74 72 61 63 65 46 75 | 6e 63 27 2e 20 74 72 61 |'traceFu|nc'. tra|
|000000c0| 63 65 46 75 6e 63 20 0d | 61 6c 6c 6f 77 73 20 79 |ceFunc .|allows y|
|000000d0| 6f 75 20 74 6f 20 74 72 | 61 63 65 20 61 20 73 70 |ou to tr|ace a sp|
|000000e0| 65 63 66 69 63 20 66 75 | 6e 63 74 69 6f 6e 20 77 |ecfic fu|nction w|
|000000f0| 68 65 6e 65 76 65 72 20 | 69 74 20 69 73 20 63 61 |henever |it is ca|
|00000100| 6c 6c 65 64 2c 20 73 65 | 6e 64 69 6e 67 20 74 68 |lled, se|nding th|
|00000110| 65 20 0d 6f 75 74 70 75 | 74 20 74 6f 20 61 6e 6f |e .outpu|t to ano|
|00000120| 74 68 65 72 20 77 69 6e | 64 6f 77 2e 20 54 68 65 |ther win|dow. The|
|00000130| 20 69 6e 64 65 6e 74 65 | 64 20 74 72 61 63 65 20 | indente|d trace |
|00000140| 6f 66 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |of the f|unction |
|00000150| 69 6e 63 6c 75 64 65 73 | 20 61 6c 6c 20 0d 70 61 |includes| all .pa|
|00000160| 72 61 6d 65 74 65 72 73 | 2c 20 65 61 63 68 20 61 |rameters|, each a|
|00000170| 72 67 75 6d 65 6e 74 20 | 65 6e 63 6c 6f 73 65 64 |rgument |enclosed|
|00000180| 20 77 69 74 68 69 6e 20 | 73 69 6e 67 6c 65 20 71 | within |single q|
|00000190| 75 6f 74 65 73 2c 20 61 | 73 20 77 65 6c 6c 20 61 |uotes, a|s well a|
|000001a0| 73 20 74 68 65 20 0d 66 | 75 6e 63 74 69 6f 6e 20 |s the .f|unction |
|000001b0| 72 65 73 75 6c 74 2e 20 | 0d 0d 54 68 65 20 73 79 |result. |..The sy|
|000001c0| 6e 74 61 78 20 6f 66 20 | 74 68 65 20 66 75 6e 63 |ntax of |the func|
|000001d0| 74 69 6f 6e 20 69 73 3a | 0d 0d 74 72 61 63 65 46 |tion is:|..traceF|
|000001e0| 75 6e 63 20 6f 6e 20 3c | 66 75 6e 63 4e 61 6d 65 |unc on <|funcName|
|000001f0| 3e 20 3c 77 69 6e 4e 61 | 6d 65 3e 0d 74 72 61 63 |> <winNa|me>.trac|
|00000200| 65 46 75 6e 63 20 6f 66 | 66 0d 74 72 61 63 65 46 |eFunc of|f.traceF|
|00000210| 75 6e 63 20 73 74 61 74 | 75 73 0d 0d 0d 46 6f 72 |unc stat|us...For|
|00000220| 20 65 78 61 6d 70 6c 65 | 2c 20 69 66 20 49 20 77 | example|, if I w|
|00000230| 61 6e 74 20 74 6f 20 74 | 72 61 63 65 20 74 68 65 |ant to t|race the|
|00000240| 20 70 72 6f 63 20 27 6e | 65 78 74 46 75 6e 63 27 | proc 'n|extFunc'|
|00000250| 20 28 64 65 66 69 6e 65 | 64 20 69 6e 20 0d 70 72 | (define|d in .pr|
|00000260| 6f 63 73 2e 74 63 6c 29 | 2c 20 74 68 65 20 66 6f |ocs.tcl)|, the fo|
|00000270| 6c 6c 6f 77 69 6e 67 20 | 6d 69 67 68 74 20 62 65 |llowing |might be|
|00000280| 20 61 20 6c 6f 67 20 6f | 66 20 6d 79 20 61 63 74 | a log o|f my act|
|00000290| 69 76 69 74 79 20 61 74 | 20 74 68 65 20 54 63 6c |ivity at| the Tcl|
|000002a0| 20 73 68 65 6c 6c 3a 0d | 0d 57 65 6c 63 6f 6d 65 | shell:.|.Welcome|
|000002b0| 20 74 6f 20 41 6c 70 68 | 61 27 73 20 54 63 6c 20 | to Alph|a's Tcl |
|000002c0| 73 68 65 6c 6c 2e 0d 41 | 6c 70 68 61 3e 20 74 72 |shell..A|lpha> tr|
|000002d0| 61 63 65 46 75 6e 63 20 | 6f 6e 20 6e 65 78 74 46 |aceFunc |on nextF|
|000002e0| 75 6e 63 20 74 72 61 63 | 65 57 69 6e 0d 41 6c 70 |unc trac|eWin.Alp|
|000002f0| 68 61 3e 20 74 72 61 63 | 65 46 75 6e 63 20 73 74 |ha> trac|eFunc st|
|00000300| 61 74 75 73 0d 46 75 6e | 63 2d 74 72 61 63 69 6e |atus.Fun|c-tracin|
|00000310| 67 20 6f 6e 2c 20 66 75 | 6e 63 3a 20 6e 65 78 74 |g on, fu|nc: next|
|00000320| 46 75 6e 63 2c 20 77 69 | 6e 3a 20 74 72 61 63 65 |Func, wi|n: trace|
|00000330| 57 69 6e 0d 41 6c 70 68 | 61 3e 20 0d 0d 4e 6f 77 |Win.Alph|a> ..Now|
|00000340| 20 49 20 63 72 65 61 74 | 65 20 61 20 6e 65 77 20 | I creat|e a new |
|00000350| 77 69 6e 64 6f 77 2c 20 | 22 64 69 72 74 79 22 20 |window, |"dirty" |
|00000360| 69 74 20 73 6f 20 74 68 | 61 74 20 49 20 63 61 6e |it so th|at I can|
|00000370| 20 67 65 74 20 61 20 73 | 61 76 65 20 64 69 61 6c | get a s|ave dial|
|00000380| 6f 67 2c 20 0d 61 6e 64 | 20 73 61 76 65 20 69 74 |og, .and| save it|
|00000390| 20 61 73 20 27 74 72 61 | 63 65 57 69 6e 27 2e 20 | as 'tra|ceWin'. |
|000003a0| 4e 6f 74 65 20 74 68 61 | 74 20 74 72 61 63 69 6e |Note tha|t tracin|
|000003b0| 67 20 69 73 20 6f 6e 6c | 79 20 73 65 6e 74 20 74 |g is onl|y sent t|
|000003c0| 6f 20 6f 70 65 6e 20 0d | 77 69 6e 64 6f 77 73 2c |o open .|windows,|
|000003d0| 20 73 6f 20 49 20 6d 75 | 73 74 20 6c 65 61 76 65 | so I mu|st leave|
|000003e0| 20 27 74 72 61 63 65 57 | 69 6e 27 20 6f 70 65 6e | 'traceW|in' open|
|000003f0| 2e 0d 0d 54 68 65 6e 20 | 49 20 6f 70 65 6e 20 61 |...Then |I open a|
|00000400| 6e 79 20 72 61 6e 64 6f | 6d 20 6e 6f 6e 2d 43 20 |ny rando|m non-C |
|00000410| 66 69 6c 65 20 28 62 65 | 63 61 75 73 65 20 49 20 |file (be|cause I |
|00000420| 77 61 6e 74 20 74 68 65 | 20 66 75 6e 63 74 69 6f |want the| functio|
|00000430| 6e 20 74 6f 20 66 61 69 | 6c 29 2c 20 67 6f 20 0d |n to fai|l), go .|
|00000440| 74 6f 20 74 68 65 20 62 | 65 67 69 6e 6e 69 6e 67 |to the b|eginning|
|00000450| 20 6f 66 20 74 68 65 20 | 66 69 6c 65 2c 20 61 6e | of the |file, an|
|00000460| 64 20 74 79 70 65 20 65 | 73 63 61 70 65 2d 78 20 |d type e|scape-x |
|00000470| 27 6e 65 78 74 46 75 6e | 63 27 2e 20 20 54 68 65 |'nextFun|c'. The|
|00000480| 20 6f 75 74 70 75 74 20 | 0d 73 68 6f 75 6c 64 20 | output |.should |
|00000490| 6c 6f 6f 6b 20 73 6f 6d | 65 74 68 69 6e 67 20 6c |look som|ething l|
|000004a0| 69 6b 65 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ike the |followin|
|000004b0| 67 3a 0d 0d 6e 65 78 74 | 46 75 6e 63 20 0d 20 73 |g:..next|Func . s|
|000004c0| 65 61 72 63 68 46 75 6e | 63 20 27 31 27 20 0d 20 |earchFun|c '1' . |
|000004d0| 20 67 65 74 50 6f 73 20 | 0d 20 20 4f 4b 3a 20 33 | getPos |. OK: 3|
|000004e0| 38 35 33 30 0d 20 20 73 | 65 6c 65 63 74 20 27 33 |8530. s|elect '3|
|000004f0| 38 35 33 30 27 20 0d 20 | 20 4f 4b 3a 20 0d 20 20 |8530' . | OK: . |
|00000500| 73 61 76 65 56 61 72 73 | 20 0d 20 20 4f 4b 3a 20 |saveVars| . OK: |
|00000510| 0d 20 20 69 66 20 27 28 | 31 3d 3d 31 29 27 20 27 |. if '(|1==1)' '|
|00000520| 0d 09 09 6e 65 78 74 4c | 69 6e 65 0d 09 27 20 27 |...nextL|ine..' '|
|00000530| 65 6c 73 65 27 20 27 0d | 09 09 70 72 65 76 69 6f |else' '.|..previo|
|00000540| 75 73 4c 69 6e 65 0d 09 | 27 20 0d 20 20 20 6e 65 |usLine..|' . ne|
|00000550| 78 74 4c 69 6e 65 20 0d | 20 20 20 4f 4b 3a 20 0d |xtLine .| OK: .|
|00000560| 20 20 4f 4b 3a 20 0d 20 | 20 67 65 74 50 6f 73 20 | OK: . | getPos |
|00000570| 0d 20 20 4f 4b 3a 20 33 | 38 35 37 33 0d 20 20 73 |. OK: 3|8573. s|
|00000580| 65 74 20 27 70 6f 73 27 | 20 27 33 38 35 37 33 27 |et 'pos'| '38573'|
|00000590| 20 0d 20 20 4f 4b 3a 20 | 33 38 35 37 33 0d 20 20 | . OK: |38573. |
|000005a0| 73 65 74 56 61 72 20 27 | 72 65 67 45 78 70 72 27 |setVar '|regExpr'|
|000005b0| 20 27 31 27 20 0d 20 20 | 4f 4b 3a 20 0d 20 20 73 | '1' . |OK: . s|
|000005c0| 65 74 56 61 72 20 27 66 | 6f 72 77 61 72 64 27 20 |etVar 'f|orward' |
|000005d0| 27 31 27 20 0d 20 20 4f | 4b 3a 20 0d 20 20 73 65 |'1' . O|K: . se|
|000005e0| 74 56 61 72 20 27 69 67 | 6e 6f 72 65 43 61 73 65 |tVar 'ig|noreCase|
|000005f0| 27 20 27 31 27 20 0d 20 | 20 4f 4b 3a 20 0d 20 20 |' '1' . | OK: . |
|00000600| 73 65 61 72 63 68 20 27 | 5e 5b 5e 20 5c 74 5c 28 |search '|^[^ \t\(|
|00000610| 23 5c 72 2f 40 5d 2e 2a | 5c 28 2e 2a 5c 29 24 27 |#\r/@].*|\(.*\)$'|
|00000620| 20 27 33 38 35 37 33 27 | 20 0d 20 20 45 52 52 4f | '38573'| . ERRO|
|00000630| 52 3a 20 53 65 61 72 63 | 68 20 75 6e 73 75 63 63 |R: Searc|h unsucc|
|00000640| 65 73 73 66 75 6c 0d 20 | 45 52 52 4f 52 3a 20 53 |essful. |ERROR: S|
|00000650| 65 61 72 63 68 20 75 6e | 73 75 63 63 65 73 73 66 |earch un|successf|
|00000660| 75 6c 0d 45 52 52 4f 52 | 3a 20 53 65 61 72 63 68 |ul.ERROR|: Search|
|00000670| 20 75 6e 73 75 63 63 65 | 73 73 66 75 6c 0d 0d 0d | unsucce|ssful...|
|00000680| 54 68 65 20 74 72 61 63 | 65 20 6f 75 74 70 75 74 |The trac|e output|
|00000690| 20 73 68 6f 77 73 20 74 | 68 61 74 20 74 68 65 20 | shows t|hat the |
|000006a0| 70 72 6f 62 6c 65 6d 20 | 77 61 73 20 61 6e 20 75 |problem |was an u|
|000006b0| 6e 73 75 63 63 65 73 73 | 66 75 6c 20 73 65 61 72 |nsuccess|ful sear|
|000006c0| 63 68 2e 20 49 6e 20 0d | 74 68 69 73 20 63 61 73 |ch. In .|this cas|
|000006d0| 65 2c 20 61 20 64 69 61 | 6c 6f 67 20 69 6e 66 6f |e, a dia|log info|
|000006e0| 72 6d 65 64 20 75 73 20 | 6f 66 20 74 68 69 73 20 |rmed us |of this |
|000006f0| 66 61 63 74 20 61 6e 79 | 77 61 79 2c 20 62 75 74 |fact any|way, but|
|00000700| 20 6d 61 6e 79 20 41 6c | 70 68 61 20 0d 72 6f 75 | many Al|pha .rou|
|00000710| 74 69 6e 65 73 20 61 72 | 65 20 6e 6f 74 20 61 73 |tines ar|e not as|
|00000720| 20 66 72 69 65 6e 64 6c | 79 20 77 68 65 6e 20 69 | friendl|y when i|
|00000730| 74 20 63 6f 6d 65 73 20 | 74 6f 20 65 72 72 6f 72 |t comes |to error|
|00000740| 20 6d 65 73 73 61 67 65 | 73 2e 0d 0d 0d 41 6e 6f | message|s....Ano|
|00000750| 74 68 65 72 20 77 61 79 | 20 74 6f 20 64 65 62 75 |ther way| to debu|
|00000760| 67 20 54 63 6c 20 72 6f | 75 74 69 6e 65 73 20 69 |g Tcl ro|utines i|
|00000770| 73 20 74 6f 20 69 6e 73 | 65 72 74 20 73 74 61 74 |s to ins|ert stat|
|00000780| 65 6d 65 6e 74 73 20 74 | 68 61 74 20 70 72 69 6e |ements t|hat prin|
|00000790| 74 20 0d 76 61 6c 75 65 | 73 20 74 6f 20 61 6e 6f |t .value|s to ano|
|000007a0| 74 68 65 72 20 77 69 6e | 64 6f 77 2e 20 46 6f 72 |ther win|dow. For|
|000007b0| 20 65 78 61 6d 70 6c 65 | 2c 20 6f 6e 65 20 63 6f | example|, one co|
|000007c0| 75 6c 64 20 75 73 65 20 | 74 68 65 20 66 6f 6c 6c |uld use |the foll|
|000007d0| 6f 77 69 6e 67 20 0d 72 | 6f 75 74 69 6e 65 3a 20 |owing .r|outine: |
|000007e0| 0d 0d 70 72 6f 63 20 6f | 75 74 20 61 72 67 73 20 |..proc o|ut args |
|000007f0| 7b 0d 09 69 6e 73 65 72 | 74 54 65 78 74 20 2d 77 |{..inser|tText -w|
|00000800| 20 22 2a 74 63 6c 20 73 | 68 65 6c 6c 2a 22 20 24 | "*tcl s|hell*" $|
|00000810| 61 72 67 73 0d 7d 0d 0d | 00 00 00 00 00 00 00 00 |args.}..|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000880| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000890| 6f 6e 74 57 69 6e 3b 0d | 65 78 74 65 72 6e 20 69 |ontWin;.|extern i|
|000008a0| 6e 74 09 09 09 66 6f 72 | 65 47 72 6f 75 6e 64 3b |nt...for|eGround;|
|000008b0| 09 44 65 62 75 67 67 69 | 6e 67 02 00 00 00 54 45 |.Debuggi|ng....TE|
|000008c0| 58 54 41 4c 46 41 01 00 | 00 6a 00 47 00 00 00 00 |XTALFA..|.j.G....|
|000008d0| 00 00 54 45 58 54 41 4c | 46 41 01 00 00 6a 00 47 |..TEXTAL|FA...j.G|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 a9 a2 6a 97 00 00 | 07 98 00 00 01 7e 78 74 |....j...|.....~xt|
|00000900| 65 72 6e 20 63 68 61 72 | 09 09 09 2a 66 75 6e 63 |ern char|...*func|
|00000910| 54 69 74 6c 65 3b 0d 65 | 78 74 65 72 6e 20 72 65 |Title;.e|xtern re|
|00000920| 67 65 78 70 09 09 2a 72 | 65 67 73 74 72 75 63 74 |gexp..*r|egstruct|
|00000930| 3b 0d 65 78 74 65 72 6e | 20 69 6e 74 09 09 09 66 |;.extern| int...f|
|00000940| 75 6e 63 50 61 72 3b 0d | 65 78 74 65 72 6e 20 54 |uncPar;.|extern T|
|00000950| 63 6c 5f 49 6e 74 65 72 | 70 09 2a 61 49 6e 74 65 |cl_Inter|p.*aInte|
|00000960| 72 70 3b 0d 65 78 74 65 | 72 6e 20 54 63 6c 5f 43 |rp;.exte|rn Tcl_C|
|00000970| 6d 64 42 75 66 09 61 42 | 75 66 66 65 72 3b 0d 65 |mdBuf.aB|uffer;.e|
|00000980| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 dd 89 d0 |...H..Mo|naco....|
|00000990| 00 00 17 e0 00 d5 7c 04 | 00 f4 1e 50 24 00 04 44 |......|.|...P$..D|
|000009a0| 01 87 69 b0 00 00 00 04 | 00 04 00 28 00 02 01 ca |..i.....|...(....|
|000009b0| 02 00 00 28 00 02 01 ca | 02 00 ac ca e0 48 00 00 |...(....|.....H..|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|000009d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 d3 ee 78 |...L...L|...2...x|
|000009e0| 17 e0 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|000009f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 dd 8c 08 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+